#ifndef ZC4_HARDWARE_INTERFACE_HPP
#define ZC4_HARDWARE_INTERFACE_HPP

#include "hardware_interface/system_interface.hpp"
#include "my_robot_hardware/xm430_driver.hpp"

namespace zc4_hardware {

class Zc4HardwareInterface : public hardware_interface::SystemInterface
{
public:
    // Lifecycle node override
    hardware_interface::CallbackReturn
        on_configure(const rclcpp_lifecycle::State & previous_state) override;
    hardware_interface::CallbackReturn
        on_activate(const rclcpp_lifecycle::State & previous_state) override;
    hardware_interface::CallbackReturn
        on_deactivate(const rclcpp_lifecycle::State & previous_state) override;

    // SystemInterface override
    hardware_interface::CallbackReturn
        on_init(const hardware_interface::HardwareInfo & info) override;
    hardware_interface::return_type
        read(const rclcpp::Time & time, const rclcpp::Duration & period) override;
    hardware_interface::return_type
        write(const rclcpp::Time & time, const rclcpp::Duration & period) override;

private:
    std::shared_ptr<XM430Driver> driver_;
    int dxl_id_1;
    int dxl_id_2;
    int dxl_id_3;
    int dxl_id_4;
    int dxl_id_5;
    std::string port_;
    
}; // class Zc4HardwareInterface    

}  // namespace zc4_hardware

#endif  // ZC4_HARDWARE_INTERFACE_HPP
